<style lang="less" scoped>
@import url('./style.less');
</style>

<template>
  <div class="box">
    <div class="box-title" @click="show=!show">
      <div class="box-title__label">股东（发起人）及出资信息</div>
      <div class="box-title__right">
        <span class="num">{{len||'无'}}</span>
        <i v-if="len>0" :class="cls"></i>
      </div>
    </div>
    <div class="box-content" v-show="show">
      <gudong-panel v-for="(item, index) in dt" :key="index" :item="item"></gudong-panel>
    </div>
  </div>
</template>
<script>
import GudongPanel from './gudong-panel';
export default {
  components: {
    GudongPanel
  },
  props: ['dt'],
  data() {
    return {
      show: false
    };
  },
  onUnload() {
    this.show = false;
  },
  computed: {
    cls() {
      const arrow = this.show ? 'icon-shangjiantou' : 'icon-tubiaozhizuo-';
      return `iconfont ${arrow}`;
    },
    len() {
      return this.dt.length;
    }
  }
};
</script>
